 /**
 * @file tal_zcl_group.h
 * @brief Common process - group manager
 * @version 1.0.0
 * @date 2021-09-19
 *
 * @copyright Copyright 2018-2021 Tuya Inc. All Rights Reserved.
 *
 */
#ifndef __TAL_ZCL_GROUP_H__
#define __TAL_ZCL_GROUP_H__


#ifdef __cplusplus
    extern "C" {
#endif

#include "tuya_cloud_types.h"
#include "tuya_zigbee_stack.h"

/**
 * @brief find group on endpoint
 *
 * @param[in]   ep_id:    endpoint
 * @param[in]   group_id: group id
 * @return  TRUE/ FALSE
 */
BOOL_T tal_zg_find_group(UINT8_T ep_id, UINT16_T group_id);

/**
 * @brief add group at location endpoint
 * 
 * @param[in]   ep_id:    endpoint
 * @param[in]   group_id: group id
 * @return  TRUE/ FALSE
 */
BOOL_T tal_zg_add_group(UINT8_T ep_id, UINT16_T group_id);

/**
 * @brief remove group at location endpoint
 *
 * @param[in]   ep_id:    endpoint
 * @param[in]   group_id: group id
 * @return  TRUE/ FALSE
 */
BOOL_T tal_zg_remove_group(UINT8_T ep_id, UINT16_T group_id);

/**
 * @brief clear all group
 *
 * @param[in]   none
 * @return  none
 */
VOID_T tal_zg_clear_all_group(VOID_T);


/**
 * @brief add group callback
 * @note < this is a weak function you can rewrite this API in app layer >
 *
 * @param[in]   ep_id:    endpoint id
 * @param[in]   group_id: group id
 * @return  none
 */
VOID_T tal_zg_add_group_callback(UINT8_T ep_id, UINT16_T group_id);

/**
 * @brief view group callback
 * @note < this is a weak function you can rewrite this API in app layer >
 *
 * @param[in]   ep_id:    endpoint id
 * @param[in]   group_id: group id
 * @return  none
 */
VOID_T tal_zg_view_group_callback(UINT8_T ep_id, UINT16_T group_id);

/**
 * @brief remove group callback
 * @note < this is a weak function you can rewrite this API in app layer >
 *
 * @param[in]   ep_id:    endpoint id
 * @param[in]   group_id: group id
 * @return  none
 */
VOID_T tal_zg_remove_group_callback(UINT8_T ep_id, UINT16_T group_id);


#ifdef __cplusplus
}
#endif

#endif

